<?php
namespace Shop\Model;
use Think\Model;
class FundingConsignmentModel extends Model {
    protected $_auto = [
        ["create_time", "strtotime", 3, "function"],
        ["update_time", "strtotime", 3, "function"],
        ["create_time", "time", 1, "function"],
        ["update_time", "time", 2, "function"],
    ];
    protected $_validate = [
        ["id", "require", "ID必须填写!"],
        ["funding_id", "require", "筹单必须填写!"],
        ["create_time", "require", "创建时间必须填写!"],
        ["update_time", "require", "更新时间必须填写!"],
    ];
    public $excel = false;
    public $update = false;
    public $detail = false;
    public $fieldMap = [
        "id"=>[
            "type"=>"input",
            "name"=>"ID",
            "lists"=>true,
            "search"=>true,
            "input"=>false,
            "required"=>true,
            "detail"=>true,
            "excel"=>true,
            "content"=>"",
            "list_specify"=>"",
            "update_specify"=>"",
            "detail_specify"=>"",
        ],
        "user_id"=>[
            "type"=>"input",
            "name"=>"",
            "lists"=>false,
            "search"=>false,
            "input"=>true,
            "required"=>false,
            "detail"=>false,
            "excel"=>true,
            "content"=>"",
            "list_specify"=>"",
            "update_specify"=>"",
            "detail_specify"=>"",
        ],
        "user_id"=>[
            "type"=>"input",
            "name"=>"购买链接",
            "lists"=>true,
            "search"=>false,
            "input"=>true,
            "required"=>false,
            "detail"=>false,
            "excel"=>true,
            "content"=>"",
            "list_specify"=>'<td class="center">http://www.116lyw.com/Home/Funding/detail/id/{$vo["funding_id"]}/consignment_id/{:session("商家")["id"]}</td>',
            "update_specify"=>"",
            "detail_specify"=>"",
        ],

        "funding_id"=>[
            "type"=>"foreign",
            "name"=>"筹单",
            "lists"=>true,
            "search"=>false,
            "input"=>true,
            "required"=>true,
            "detail"=>true,
            "excel"=>true,
            "content"=>"funding,id,name,input",
            "list_specify"=>"",
            "update_specify"=>"",
            "detail_specify"=>"",
        ],
        "qrcode"=>[
            "type"=>"file",
            "name"=>"二维码",
            "lists"=>true,
            "search"=>false,
            "input"=>true,
            "required"=>true,
            "detail"=>true,
            "excel"=>true,
            "content"=>"",
            "list_specify"=>'<td class="center"><img src="__PUBLIC__/file/{$vo[\'qrcode\']}" width="120px"/></td>',
            "update_specify"=>"",
            "detail_specify"=>"",
        ],

        "create_time"=>[
            "type"=>"datetime",
            "name"=>"创建时间",
            "lists"=>false,
            "search"=>false,
            "input"=>false,
            "required"=>true,
            "detail"=>true,
            "excel"=>true,
            "content"=>"",
            "list_specify"=>"",
            "update_specify"=>"",
            "detail_specify"=>"",
        ],
        "update_time"=>[
            "type"=>"datetime",
            "name"=>"更新时间",
            "lists"=>false,
            "search"=>false,
            "input"=>false,
            "required"=>true,
            "detail"=>true,
            "excel"=>true,
            "content"=>"",
            "list_specify"=>"",
            "update_specify"=>"",
            "detail_specify"=>"",
        ],
    ];
}